'use client'
import {useState} from "react";

function TagSlot() {
    return (
        <div>

            <A chaCao={(user)=><B user={user} />} />
        </div>
    );
}
function A(props){
    console.log(props)
    const [user] = useState({name:'小明',age:18})
    return <div>我是A
        {props.chaCao(user)}
    </div>
}
function B(props){
    return <div>我是B 获取参数:{props.user.name}-{props.user.age}</div>
}

export default TagSlot;